/*==========================================================================
 * 
 * Watermarker.java
 * 
 * $Author: Sophia Ghins $
 * $Revision: 1.3.0 $
 * $Date: 2009/04/27 01:48:32 $
 * $Name:  $
 * 
 * Created on 15-Nov-2003
 * Created by Marcel Palko alias Randallco (randallco@users.sourceforge.net)
 *==========================================================================*/
package net.sourceforge.ehep.core;

import org.eclipse.swt.widgets.Composite;
import java.util.*;

import net.sourceforge.ehep.*;

/**
 * @author Sophia Ghins
 * Enhancement in project by @author randallco@users.sourceforge.net
 */
public class Watermarker {
	private Vector<String> watermarkOptions = new Vector<String>();
	private Vector<String> watermarkSign = new Vector<String>();
	StringTokenizer st;
	
	/**
	 * Loads the watermark options from plugin property file
	 * @param parent
	 */
	public Watermarker(Composite parent) {
		String wmarkList = EhepPlugin.getResourceString("watermark.options");
		st = new StringTokenizer(wmarkList, ",");
		
		while (st.hasMoreTokens()) {
			watermarkOptions.add(st.nextToken());
		} // while
	}
	
	/**
	 * Returns vector with watermark options
	 * @return vector with watermark options
	 */
	public Vector<String> getWatermarkOptions() {
		return watermarkOptions;
	}
	
	/**
	 * Returns vector with watermark options
	 * @return vector with watermark options
	 */
	public Vector<String> getWatermark_Sign() {
		getSignList();
		return watermarkSign;
	}
	
	/**
	 * Loads the signature from plugin property file
	 */
	public void getSignList(){
		String signList = EhepPlugin.getResourceString("watermark.sign");
		st = new StringTokenizer(signList, ",");
		while (st.hasMoreTokens()) {
			watermarkSign.add(st.nextToken());
		}
	}
	
}
